package com.huali.servlet;

import com.huali.dao.TestDao;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

@WebServlet("/test")
public class TestServlet extends BaseServlet{
    //创建数据访问层对象
    private  final TestDao testDao = new TestDao();

    public  List<Map<String,Object>> test01(HttpServletRequest request, HttpServletResponse response){
        List<Map<String,Object>> list = testDao.getList();

        return list;
    }

    public  String test02(HttpServletRequest request, HttpServletResponse response){
        return "测试方法02运行成功! ! !";
    }
}
